Methods
(static) areValuesEqualWith(accessor) → {function}
- Source:
- Since:
- 0.21.0
- See:
Return a function expecting an object and returning true
if its values,
once processed with the provided accessor
function, are all equal.
Example
> areValuesEqual = areValuesEqualWith(getValue)
> areValuesEqual({
a: {key: 'a', value: 1},
b: {key: 'b', value: 1},
})
true
> areValuesEqual({
a: {key: 'a', value: 1},
b: {key: 'b', value: 2},
})
false
Parameters:
Name | Type | Description |
---|---|---|
accessor |
function | Any -> Any |
Returns:
- Object -> Boolean
- Type
- function